export default {
    namespaced: true,
    state: {
        isShowToast: false,
        toastMsg: "手机号",
        toastType: '类型'
    },
    mutations: {
        changeisShowToast(state, payload) {
            state.isShowToast = payload.isShow
            if (payload.isShow) {
                state.toastMsg = payload.msg
                state.toastType = payload.type
            }
        },
    },
    actions: {
        asychangeisShowToast(context, payload) {
            console.log('asychangeisShowToast');
            context.commit("changeisShowToast", payload)
            setTimeout(() => {
                context.commit('changeisShowToast', {
                    isShow: false
                })
            }, 2000);

        }
    }
}